package org.luxor.commons.websocket.webClient;

import org.luxor.commons.websocket.annotation.WebSocketClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.websocket.OnMessage;

/**
 * @author Mr.yan  @date 2021/9/5
 */
@Component
@WebSocketClient("ws://localhost:8080/websocket/notices?Authorization=yxm")
public class WebUserYxmClient {
    private static final Logger log = LoggerFactory.getLogger(WebUserYxmClient.class);

    @OnMessage
    public void onMessage(String message) {
        log.info("【WebUserYxmClient】接收服务器通知消息：" + message);
    }

}
